package com.fenyin.samples.study.netty.http;

import java.util.logging.Level;
import java.util.logging.Logger;


public class TransferService {
	
	private static final Logger logger = Logger.getLogger(TransferService.class.getName());
	private String filePath = "";
	
	public TransferService(String filePath){
		this.filePath = filePath;
	}
	
	public String transfer(String uri){
		try{
			return FileUtil.readFile(filePath+uri);
		}catch(Throwable th){
			logger.log(Level.INFO, "业务异常",th);
			return "sorry,error!";
		}
	}
}
